# import json
# data = "企业_0_陕西罗德建设科技有限公司_91610000741274850Q.txt"
# file1 = "/Users/wangshuguan/陕西省企业数据/"+data
# file2 = "/Users/wangshuguan/陕西省企业数据bbb/"+data
# with open(file1) as f:
#     def save(filename, contents):
#         fh = open(filename, 'w', encoding='utf-8')
#         fh.write(contents)
#         fh.close()
#     save(file2, json.dumps(json.load(f),ensure_ascii=False))
import pandas as pd
df = pd.read_excel("/Users/wangshuguan/陕西省全部数据.xls",dtype=str)
# print(df.columns)
print(len(df.企业名称.unique()))
# print(list(df[0:1].to_numpy()))
# dfs = []
# for i in range(1,1236):
#     df = pd.read_json(f"/Users/wangshuguan/陕西省/陕西省{i}.txt",dtype=str)
#     df.columns=["序号"  ,"企业名称"  ,"资质分类"  ,"所在地"  ,"资质证书号"  ,"有效期至"  ,"资质范围" ,""]
#     dfs.append(df[1:])
# pd.concat(dfs).to_excel("/Users/wangshuguan/陕西省全部数据.xls")




# print(df.code.unique())
# print(df[df.name=="泰安市鑫顺水电安装有限公司"].code)